angular.module('starter', ['ionic', 'mycontrollers'])

.run(function($ionicPlatform) {
  $ionicPlatform.ready(function() {
    // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
    // for form inputs)
    if (window.cordova && window.cordova.plugins.Keyboard) {
      cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
    }
    if (window.StatusBar) {
      StatusBar.styleDefault();
    }
  });
  Bmob.initialize("b895f09906b8044d63943c06a053dcf5", "9774ab2974b0203f6011f81dab299ddc");
})

.config(function($stateProvider, $urlRouterProvider) {

  $stateProvider
    .state('welcome', {
      url: '/welcome',
      templateUrl: 'templates/welcome.html'

    })

  .state('login', {
    url: '/login',
    templateUrl: 'templates/login.html'

  })

  .state('register', {
    url: '/register',
    templateUrl: 'templates/register.html'

  })

  .state('goin', {
    url: '/goin',
    templateUrl: 'templates/goin.html',

  })

  .state('game', {
      url: '/game',
      templateUrl: 'templates/game.html'
    })
    .state('friends', {
      url: '/friends',
      templateUrl: 'templates/friends.html'
    })
    .state('about', {
      url: '/about',
      templateUrl: 'templates/about.html'
    })
    .state('play', {
      url: '/play',
      templateUrl: 'templates/play.html'
    })
    .state('settoself', {
      url: '/settoself',
      templateUrl: 'templates/settoself.html'
    })
    .state('friendinfo', {
      url: '/friendinfo',
      templateUrl: 'templates/friendinfo.html'
    })
    .state('headiconinfo',{
      url:'/headiconinfo',
      templateUrl: 'templates/headiconinfo.html'
    })
    ;



  $urlRouterProvider.otherwise('/welcome');
});